<template>
	<view class="bg-white">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="content">工资记录总表详情</block>
			<block slot="right">
				<image @click="showFun" class="nav-right-image" src="@/static/images/nav_opt.png"></image>
			</block>
		</cu-custom>
		<view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					薪资所属时间
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{affiliationTime}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					工号
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{workNumber}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					姓名
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{name}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					部门
				</view>
				<view class="flex-sub padding-sm margin-xs radius" style="margin-left: -90px;">
					<view style="background-color: #f9f9f9;padding: 5px 10px;margin-top: -5px; ">
						<image src="@/static/blue.png" style="width: 10px;height: 10px;margin-right: 5px;">
						</image>
						<text>
							{{department}}
						</text>
					</view>
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					职务
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{duties}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					基本工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{baseWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					出勤天数
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{attendanceDays}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					出勤工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{attendanceWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					绩效工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{performanceWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					其他补扣
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{otherAdditionalDeductions}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					补贴
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{subsidies}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					奖惩
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{rewardsPunishments}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					满勤奖
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{fullAttendance}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					工龄工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{seniorityWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					应付工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{payableWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					社保扣款
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{socialSecurityDeductions}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					个税扣款
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{personalDeductions}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					其他扣款
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{otherDeductions}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					水电费
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{waterElectricityDeductions}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					伙食费
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{boardExpenses}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					实发工资
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{realityWages}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					工资发放时间
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{grantTime}}
				</view>
			</view>
			<view class="flex">
				<view class="flex-sub padding-sm margin-xs radius">
					是否同步
				</view>
				<view style="margin-left: -80px;" class="flex-sub padding-sm margin-xs radius">
					{{isSynchronous}}
				</view>
			</view>

		</view>


		<view class="fun-wrap" v-show="isShowFun" @click="hideFun">
			<view class="fun-box" :style="{top:this.CustomBar+'px'}">
				<view class="fun-item" @click.stop="gotoAdd">
					<image class="fun-icon" src="@/static/images/addIcon.png" />
					<text class="fun-text">新增</text>
				</view>
				<view class="fun-item" @click="importBtn">
					<image class="fun-icon" src="@/static/images/importIcon.png" />
					<text class="fun-text">导入</text>
				</view>
				<view class="fun-item" @click="exportBtn">
					<image class="fun-icon" src="@/static/images/exportIcon.png" />
					<text class="fun-text">导出</text>
				</view>
				<view class="fun-item" @click="draftBatchBtn">
					<image class="fun-icon" src="@/static/images/draftIcon.png" />
					<text class="fun-text">草稿箱</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import moment from 'moment';
	export default {
		data() {
			return {
				isShowFun:'',
				affiliationTime:'2021/09',
				workNumber:'AQF123456',
				name:'张销魂生产线前纺AQF一纺白班高空清洁',
				department: '白班',
				duties:'生产线前纺AQF一纺白班高空清洁',
				baseWages:'4000',
				attendanceDays:'30天',
				attendanceWages:'54',
				performanceWages:'55',
				otherAdditionalDeductions:'56',
				subsidies:'56',
				rewardsPunishments:'56',
				fullAttendance:'56',
				seniorityWages:'56',
				payableWages:'56',
				socialSecurityDeductions:'56',
				personalDeductions:'56',
				otherDeductions:'56',
				waterElectricityDeductions:'56',
				boardExpenses:'56',
				realityWages:'56',
				grantTime:'2021-09-30',
				isSynchronous:'是',
				onLoad: function() {
					let that = this;
					setTimeout(function() {
						that.loading = true
					}, 500)
				},
			}
		},
		mounted() {

		},
		computed: {
			createTimeShow: function() {
				return moment(this.createTime).isValid() ? moment(this.createTime).format('MM-YY') : ''
			}
		},
		methods: {
			clearSearch() {
				this.searchValue = ''
			},
			bindPickerChange(e) {
				this.index = e.detail.value
			},
			showFun() {
				this.isShowFun = true
			},
			hideFun() {
				this.isShowFun = false
			},

			gotoAdd() {

				uni.navigateTo({
					// url: '/pages/rewardsPunishments/rewardsPunishmentsAdd/index'
				})

			}
		}
	}
</script>

<style lang="scss" scoped>
	image {
		width: 100%;
		height: 100%;
	}

	.blackList {
		height: 100%;
		overflow: hidden;
	}

	.page-search {
		padding-left: 34rpx;
		margin-bottom: 12rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.search {
		width: 680rpx;
		height: 86rpx;
		background-color: rgba(249, 249, 249, 1);
		border-radius: 60rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding-left: 24rpx;
		padding-right: 24rpx;

		.search-left {
			width: 28rpx;
			height: 28rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.search-center {
			margin-left: 22rpx;
		}

		.search-placeholder {
			font-size: 28rpx;
			font-weight: 400;
			color: #7C7C7C;
		}


	}

	.filter-btn {
		width: 40rpx;
		height: 40rpx;
		margin-right: 42rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.page-content-main {
		height: calc(100% - 12rpx - 86rpx);
		border-top-left-radius: 64rpx;
		border-top-right-radius: 64rpx;
		padding: 26rpx 34rpx 0 34rpx
	}

	.select-box {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		margin-top: 20px;
		margin-bottom: -30px;
	}

	.select {
		width: 160rpx;
		height: 74rpx;
		border-radius: 60rpx;
		background-color: #4591FE;
		margin-bottom: 20rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		margin-right: 12px;
		position: relative;

    .select-value {
      font-size: 28rpx;
      font-weight: 400;
      color: #FFFFFF;
      margin-right: 18rpx;
    }

    .select-icon {
      width: 22rpx;
      height: 22rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      right: 20rpx;
      top:25rpx;
    }
	}

	.list {
		height: calc(100% - 74rpx - 20rpx);
	}

	.list-item {
		border-radius: 28rpx;
		background-color: #FFFFFF;
		padding: 26rpx 24rpx 28rpx 20rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-bottom: 26rpx;
		position: relative;

		.list-item-leftCenter {
			display: flex;
			flex-direction: row;
		}

		.list-item-left {
			width: 86rpx;
			height: 86rpx;
			margin-right: 26rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.list-item-center {
			.list-item-row {
				display: flex;
				flex-direction: row;
				margin-bottom: 20rpx;

				.list-item-name {
					color: #101317;
					font-size: 32rpx;
					margin-right: 16rpx;
				}

				.list-item-sex {
					width: 106rpx;
					height: 42rpx;
					border-top-right-radius: 40rpx;
					border-bottom-right-radius: 40rpx;
					border-bottom-left-radius: 20rpx;
					background-color: rgba(234, 171, 78, 0.35);
					line-height: 42rpx;
					text-align: center;
					color: rgba(255, 173, 4, 1);
					font-size: 24rpx;
				}

				.list-item-row-icon {
					width: 38rpx;
					height: 38rpx;
					margin-right: 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.list-item-row-title,
				.list-item-row-value {
					font-size: 24rpx;
					font-weight: 400;
					color: #101317;
					line-height: 38rpx;
				}

			}
		}

		.list-item-btn {
			width: 36rpx;
			height: 36rpx;
			margin-top: 56rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.list-item-tab {
			width: 132rpx;
			height: 56rpx;
			text-align: center;
			line-height: 56rpx;
			background-color: rgba(69, 145, 254, 0.4);
			position: absolute;
			top: 0;
			right: 0;
			border-top-right-radius: 26rpx;
			border-bottom-left-radius: 20rpx;
		}

		.list-item-tab-text {
			font-size: 26rpx;
			color: rgba(69, 145, 254, 1)
		}
	}

	.nav-right-image {
		width: 80rpx;
		height: 80rpx;
		margin-left: 15px;
	}

	.fun-wrap {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(3, 3, 3, 0.28);
		z-index: 10000;
	}

	.fun-box {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		flex-wrap: wrap;
		width: 556rpx;
		height: 444rpx;
		border-top-left-radius: 42rpx;
		border-bottom-left-radius: 42rpx;
		border-bottom-right-radius: 42rpx;
		position: absolute;
		right: 74rpx;
		background-color: #FFFFFF;
		padding-top: 35rpx;
	}

	.fun-item {
		width: 185rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-bottom: 44rpx;
	}

	.fun-icon {
		width: 92rpx;
		height: 92rpx;
		margin-bottom: 22rpx;
	}

	.cu-form-group {
		background-color: transparent;
	}

	::v-deep {
		.cu-form-group uni-picker .picker {
			color: #FFFFFF;
		}

		.cu-form-group uni-picker::after {
			opacity: 0;
		}
	}

	.textView {
		margin-left: 25px;
		font-size: 10px;
		margin-top: 5px;
	}

	.listText {
		width: 148rpx;
		height: 24rpx;
		font-size: 20rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #000000;
		line-height: 24rpx;
	}
</style>
